package com.jackrain.nea.core.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

@Mapper
@Component
public interface MapperDDL {
    @Update("alter table ${tableName} drop ${columnName}")
    int dropColumn(@Param("tableName") String tableName, @Param("columnName") String columnName);

    @Update("drop table ${tableName} cascade constraints")
    int dropTable(@Param("tableName") String tableName);

    @Update("${sql}")
    int exec(@Param("sql") String sql);
}

